﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Main.Master" AutoEventWireup="true"
    CodeBehind="RequestList.aspx.cs" Inherits="AUV5.Web.Pages.RequestList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        //发布需求时的登录验证
        $(function () {
            if ('<%=base.IsVerified %>' == 'False') {
                $('#ibtnAddRequest').click(function (e) {
                    login();
                    preventDefault(e);
                });
            }
        })
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="fl main_left">
        <p class="usertitle">
            <a href="RequestList.aspx">需求列表</a> <span <%=base.IsVerified?"":"style='display:none'" %>>
                ｜ <a href="RequestList.aspx?command=manage">我的需求</a> </span>
        </p>
        <div id="searchPanel" runat="server" class="requiredsearch">
            <p>
                <asp:ImageButton ID="ibtnSearch" ImageUrl="/!images/btn_search.png" runat="server"
                    AlternateText="搜索" OnClick="ibtnSearch_Click" />
            </p>
            <p>
                <asp:TextBox ID="txtParam" class="param" runat="server" />
            </p>
            <p>
                搜索需求</p>
        </div>
        <div id="publishPanel" runat="server" visible="false" class="sentrequiredbar">
            <p class="sentrequiredavatar">
                <img alt="" src='<%=base.IsVerified?base.VerifiedInfo.User.PhotoPath:""%>' />
            </p>
            <p class="sentrequiredicon">
                <img src="/!images/serviceadd_left.jpg" /></p>
            <div class="required_bar">
                <div class="fl">
                    <p class="requiredtxt1">
                        我需要</p>
                    <p>
                        <asp:TextBox runat="server" class="requiredinfo" ID="txtRequestTitle" />
                    </p>
                </div>
                <div class="fl">
                    <p class="requiredtxt2">
                        类别</p>
                    <p>
                        <asp:DropDownList ID="ddlCategory" CssClass="requiredc" runat="server">
                        </asp:DropDownList>
                </div>
                <div class="fl">
                    <p class="requiredtxt2">
                        悬赏</p>
                    <p>
                        <asp:DropDownList ID="ddlPrice" CssClass="requiredp" runat="server">
                            <asp:ListItem Text="5" />
                            <asp:ListItem Text="15" />
                            <asp:ListItem Text="25" />
                            <asp:ListItem Text="50" />
                        </asp:DropDownList>
                    </p>
                </div>
                <div class="btn_required">
                    <asp:ImageButton ImageUrl="/!images/btn_puboff.jpg" ID="ibtnAddRequest" onmouseover="MM_swapImage('ibtnAddRequest','','/!images/btn_pubon.jpg',5)"
                        onmouseout="MM_swapImgRestore()" alt="发布" runat="server" ClientIDMode="Static"
                        OnClick="ibtnAddRequest_Click" />
                </div>
                <p class="clear">
                </p>
            </div>
        </div>
        <div class="requiredlist">
            <ul>
                <%--<li>
                    <p class="requiredavatar">
                        <a href="">
                            <img src="/!images/avatar.jpg" /></a></p>
                    <div class="requiredinfobar">
                        <p class="requiredtitle">
                            我需要有人每天早上5点35分叫我起床，我可以支付50元</p>
                        <p class="requiredtime">
                            31天前</p>
                        <p class="requirer">
                            <a href="">湾派洱</a></p>
                    </div>
                    <p class="fr">
                        <a href="">
                            <img src="/!images/contact.jpg" /></a></p>
                </li>--%>
                <asp:Repeater ID="repRequest" runat="server" OnItemDataBound="repRequest_ItemDataBound"
                    OnItemCommand="repRequest_ItemCommand">
                    <ItemTemplate>
                        <li>
                            <p class="requiredavatar">
                                <img src="<%#(Container.DataItem as AUV5.Model.RequestInfo).User.PhotoPath%>" /></p>
                            <div class="requiredinfobar">
                                <p class="requiredtitle">
                                    我需要
                                    <%#(Container.DataItem as AUV5.Model.RequestInfo).Title %>
                                </p>
                                <p class="requiredtime">
                                    <%#GetTimeSpan((Container.DataItem as AUV5.Model.RequestInfo).CreateDate)%>
                                    价格：<%#(Container.DataItem as AUV5.Model.RequestInfo).Price.ToString("0")%>状态：<%#AUV5.Common.PageBase.GetEnumDesc(typeof(AUV5.Common.Enum.RequestState),(Container.DataItem as AUV5.Model.RequestInfo).StatusID)%></p>
                                <p class="requirer">
                                    <a href="/<%#(Container.DataItem as AUV5.Model.RequestInfo).User.UserName%>">
                                        <%#(Container.DataItem as AUV5.Model.RequestInfo).User.UserName%></a>
                                </p>
                            </div>
                            <asp:HiddenField ID="hfUserID" runat="server" Value="<%#(Container.DataItem as AUV5.Model.RequestInfo).UserID%>" />
                            <p class="fr" id="contactMe" runat="server">
                                <a class="colorbox_contact" href="MessageColorBox.aspx?userID=<%#(Container.DataItem as AUV5.Model.RequestInfo).UserID %>&requestID=<%#(Container.DataItem as AUV5.Model.RequestInfo).RequestID%>">
                                    <img src="/!images/contact.jpg" />
                                </a>
                            </p>
                            <p class="fl">
                                <asp:LinkButton ID="requestDel" CommandName="Delete" CommandArgument="<%#(Container.DataItem as AUV5.Model.RequestInfo).RequestID%>"
                                    runat="server">
                                    <img src="/!images/btn_del.jpg" />
                                </asp:LinkButton>
                            </p>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
            <div class="pages">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
                    CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页" PageIndexBoxType="DropDownList"
                    PagingButtonLayoutType="Span" SubmitButtonText="Go" TextAfterPageIndexBox="页"
                    TextBeforePageIndexBox="转到" PageSize="10" PagingButtonSpacing="" CurrentPageButtonClass="currentpage"
                    ButtonImageExtension=".jpg" ImagePath="/!images/" ShowPageIndexBox="Never">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    <div class="fr main_right">
        <div class="sortbar">
            <p class="sort">
                发布需求
            </p>
            <div class="requiredtxt">
                您可以在需求列表中来寻找自己可以提供的服务。并且通过首页右侧需求发布栏，您可以发布所有您希望获得的“哎呦喂”服务/产品需求。<br />
                <br />
                我们通过审核后，将会把需求信息呈现到首页或需求频道首页，建议您尽量完整详细的描述您的需求，这样当其他用户看后，可以快速通过站内消息与您取得联系，进而达成您的愿望。
            </div>
        </div>
        <p class="logo_privacy">
            <a href="/Pages/PrivacyPolicy.aspx">
                <img src="/!images/logo_privacy.jpg" /></a></p>
    </div>
</asp:Content>
